
import 'dart:math' as Math;
import 'package:flutter/widgets.dart';
import 'dart:convert';
import 'package:dutask/data/LUMAClassicWarnings.dart';
import 'package:dutask/providers/LUMAStatGoerli.dart';
import 'package:dutask/screens/LUMAApetag.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

class LUMAOntrol extends ConsumerWidget {
  const LUMAOntrol({
    super.key,
  });

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final lists = ref.watch(listsProvider);
    return Drawer(
      child: Column(
        children: [
          SafeArea(
            child: Column(
              children: [
                Container(
                  padding: EdgeInsets.only(top: 20, left: 20),
                  alignment: AlignmentDirectional.topStart,
                  child: Text('LUMA-TODO',
                      style: Theme.of(context).textTheme.titleLarge),
                ),
                Divider()
              ],
            ),
          ),
          Expanded(
            child: ListView(
              padding: EdgeInsets.zero,
              children: lists.map((list) {
                return ListTile(
                  leading: Icon(iconMap[list.icon]),
                  title: Text(list.title),
                );
              }).toList(),
            ),
          ),
          Column(
            children: [
              Divider(),
              ListTile(
                leading: Icon(Icons.settings_outlined),
                title: const Text('Settings'),
                selected: false,
                onTap: () {
                  Navigator.push(
                    context,
                    MaterialPageRoute(
                      builder: (context) => const LUMAValidatorLogin(),
                    ),
                  );
                },
              ),
              ListTile(
                leading: Icon(Icons.help_outline),
                title: const Text('Help and Feedback'),
                selected: false,
                onTap: () {
                  Navigator.pop(context);
                },
              ),
              ListTile(
                leading: Icon(Icons.info_outline),
                title: const Text('About'),
                selected: false,
                onTap: () {
                  Navigator.pop(context);
                },
              )
            ],
          )
        ],
      ),
    );
  }
}
